<%@ Page Language="C#" CodeBehind="UploadRetailers.aspx.cs" Inherits="Impact.Web.Admin.UploadRetailers" Async="true" %>
<%@ Register Src="~/Admin/Controls/RetailerFieldDropDown.ascx" TagPrefix="riag" TagName="RetailerFields" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
    <title>Impact Administration</title>
    <link rel="stylesheet" href="css/admin.css" type="text/css" />
    <script type="text/javascript" src="javascript/jquery.js"></script>
    <script type="text/javascript">
        $(function()
        {
            if( window.opener != null && window.opener.reload != null )
            {
                window.opener.reload();
            }
        });
    </script>
</head>
<body>
    <form id="form1" enctype="multipart/form-data" runat="server">
    
        <table class="AdminTable" style="width: 100%; margin: 0px;">
            <tr>
                <th colspan="99">Upload</th>
            </tr>
            
            <tr>
                <td><asp:Label ID="message" runat="server"></asp:Label></td>
            </tr>
            
            <asp:PlaceHolder ID="filePanel" runat="server">         
            <tr>
                <td>Filename: <input id="uploadFile" type="file" runat="server" /></td>
            </tr>
        
            <tr>
                <td style="text-align: right;">
                    <impact:ImageLinkButton ID="uploadButton" CssClass="AdminTableButton" runat="server"
                        ImageUrl="images/add.png" Text="Upload" OnCommand="UploadCommand" /></td>
            </tr>
            </asp:PlaceHolder>

            <asp:PlaceHolder ID="columnPanel" Visible="false" runat="server">
            <tr>
                <td colspan="2">
                    This file has <asp:Literal ID="columnNumberLabel" runat="server"></asp:Literal> columns.<br />
                    Please select the fields each column maps to.
                </td>
            </tr>
            
            <asp:PlaceHolder ID="fieldSelectPanel" runat="server"></asp:PlaceHolder>
        
            <tr>
                <td colspan="2" style="text-align: right;">
                    <div id="waitMessage" style="float: left; display: none;">
                        Please wait... loading may take a moment.
                    </div>
                    
                    <impact:ImageLinkButton ID="submitButton" CssClass="AdminTableButton" runat="server"
                        ImageUrl="images/add.png" Text="Save" OnCommand="SaveCommand" JavaScript="$('#waitMessage').show();" /></td>
            </tr>
            </asp:PlaceHolder>            

            <asp:PlaceHolder ID="closePanel" Visible="false" runat="server">
            <tr>
                <td colspan="2" style="text-align: right;">
                    <impact:ImageLinkButton ID="closeButton" CssClass="AdminTableButton" runat="server"
                        ImageUrl="images/cancel.png" Text="Close" JavaScript="window.close(); return false;" /></td>
            </tr>
            </asp:PlaceHolder>

            
        </table>
    
        <impact:MessageBox ID="messageBox" runat="server" />
    
    </form>
</body>
</html>
